package com.plm.frame.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.plm.frame.mapper.ProductMapper;
import com.plm.frame.model.Product;
import com.plm.frame.service.ProductService;



@Service
@Transactional  //此处不再进行创建SqlSession和提交事务，都已交由spring去管理了。
public class ProductServiceImpl implements ProductService {
	
	@Resource
	private ProductMapper mapper;

	@Override
	public List<Product> selectProduct(Product product) {
		// TODO Auto-generated method stub
		return mapper.selectProduct(product);
	}

	@Override
	public Product selectProductAsId(Product product) {
		// TODO Auto-generated method stub
		return mapper.selectProductAsId(product);
	}

	@Override
	public void addProduct(Product product) {
		// TODO Auto-generated method stub
		mapper.addProduct(product);
	}

	@Override
	public void deleteProduct(Product product) {
		// TODO Auto-generated method stub
		mapper.deleteProduct(product);
	}

	@Override
	public void editProduct(Product product) {
		// TODO Auto-generated method stub
		mapper.editProduct(product);
	}

	


	


}
